package com.dylan.service;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;

import com.dylan.entity.User;
import com.dylan.util.Page;

/**
 * 用户服务实现类
 * 
 * @author dylanchan
 *
 */
public class UserServiceImp implements UserService {
	@Autowired
	private UserService userService;

	@Override
	public List<User> getAllUser() {
		List<User> userList = userService.getAllUser();
		return userList;
	}

	@Override
	public List<User> getUsersByName(String userName) {

		List<User> userList = userService.getUsersByName(userName);

		return userList;
	}

	@Override
	public List<User> getUsersByPage(Map<String, Object> paramMap) {

		List<User> userList = userService.getUsersByPage(paramMap);

		return userList;
	}

	@Override
	public User getUserById(int id) {
		User user = userService.getUserById(id);
		return user;
	}

	@Override
	public void saveUser(User user) {
		userService.saveUser(user);
	}

	@Override
	public void updateUser(User user) {
		userService.updateUser(user);
	}

	@Override
	public void deleteUser(int id) {
		userService.deleteUser(id);
	}

	@Override
	public int getAllUserCount(Map<String, Object> paramMap) {
		return userService.getAllUserCount(paramMap);
	}

}
